package com.inter.mapper;

import com.inter.entity.common.OrderPaymentManager;
import com.inter.entity.common.OrderRefPackageManager;
import com.inter.entity.common.PartnerProductPackage;
import com.inter.entity.common.UserboundPaymentOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderPaymentManagerMapper {

     Integer storageOrderPayment(OrderPaymentManager userOrder);

    public void updateOrderIdByRequestOrderIdAndDeviceId(OrderPaymentManager user);

    public void updateIsOpenAndNotify(OrderPaymentManager userOrder);

    public List<OrderPaymentManager> getListToOpen();

    public int findOrderIdByNotify(String orderId);

    public void updatePayRst(OrderPaymentManager paymentOrder);

    public OrderPaymentManager queryOrderByOrderId(String orderId);

    public void updateIsNotify(OrderPaymentManager paymentOrder);

    public List<OrderPaymentManager> getOrderResultsList(@Param("orderId") String orderId, @Param("deviceId") String deviceId);

    public void updateIsChannelNotity(OrderPaymentManager paymentOrder);

    public List<OrderPaymentManager> getChannelResultList();

    public void insertRefPackage(OrderRefPackageManager ref);

    public void UpdatePaypalNotify(UserboundPaymentOrder order);

     Integer findDataByRequestOrderId(@Param("requestOrderId") String requestOrderId, @Param("deviceId") String deviceId, @Param("orderPeriod") String orderPeriod, @Param("partnerCode") String partnerCode, @Param("packageCode") String packageCode);

    /**
     * 查询套餐对象
     *
     * @param partnerCode
     * @param packageCode
     * @return
     */
    PartnerProductPackage queryPackageByCode(@Param("partnerCode") String partnerCode,
                                             @Param("packageCode") String packageCode);
}
